package org.springblade.modules.admin.enums;


import lombok.Getter;

/**
 * @Date 10:42 2021/8/25
 * @Description {
 *   电梯检查消息类型
 * }
 * @Author lsay
 **/
@Getter
public enum MaintainSugarStatusEnum {

	WB(1,"维保大屏"),
	WX(2,"维修大屏"),
	JY(3,"救援大屏")
	;

	MaintainSugarStatusEnum(Integer code, String name) {
		this.code = code;
		this.name = name;
	}

	private Integer code;
	private String name;

	/**
	 * 根据id获取枚举name值
	 * @param code 枚举code
	 * @return name值
	 */
	public static String getName(Integer code){
		MaintainSugarStatusEnum[] values = MaintainSugarStatusEnum.values();
		for(MaintainSugarStatusEnum elevatorAuditEnum :values){
			Integer enumId = elevatorAuditEnum.getCode();
			if(code.equals(enumId)){
				return elevatorAuditEnum.getName();
			}
		}
		return null;
	}

}
